package com.foreknow.test;

import com.foreknow.entity.User;
import com.foreknow.service.UserService;
import com.foreknow.util.DbHelper;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.SQLException;
import java.util.Date;

public class testQueryRunner {

    public static void main(String[] args) {
        String account = "admin";
        String password = "admin";
        UserService service = new UserService();
        User user = service.Login(account,password);
        System.out.println(user.getUsername());
        System.out.println(user.getId());

//        String username = "hhh333";
//        String account = "hhh333";
//        String password = "admin";
//        String phone = "123456";
//        String email = "0011";
//        String avater = "2211";
//
//        User user = new User();
//        user.setUsername(username);
//        user.setAccount(account);
//        user.setPassword(password);
//        user.setPhone(phone);
//        user.setEmail(email);
//        user.setAvater(avater);
//
//        UserService service = new UserService();
//        boolean isRight = service.Register(user);
//        System.out.println(isRight);
    }
}
